A technology for measuring a three-dimensional shape of an object is proposed in JP2010-071844A and JP2008-122361A. Particularly, a board visual inspection apparatus of JP2010-071844A measures a height of the fillet of solder joining a component to a board. Specifically, this board visual inspection apparatus irradiates a plurality of rays of light having mutually different colors to the solder from different directions and images the solder by a camera arranged above the solder. An approximate curve representing a change of an inclination angle of a surface of the solder is set based on the color of each region of the surface of the solder imaged in an imaging result, and the height of the solder is specified by integrating this approximation curve. The height of the solder specified in this way is used as a reference for judging the quality of a state of the solder.